<template>
  <div class="container">
    <!-- <input type="" name="" v-model="ruleForm.email"> -->

    <global-header :user="currentUser"></global-header>
    <!-- <Home></Home>
    <Login></Login> -->

    <router-view></router-view>
    <!-- <column-list :list="list"></column-list> -->
    <footer class="text-center py-4 text-secondary bg-light mt-6">
      <small>
        <ul class="list-inline nb-0">
          <li class="list-inline-item">@2022 者也专栏</li>
          <li class="list-inline-item">作者</li>
          <li class="list-inline-item">jack黄嘉涵</li>
        </ul>
      </small>
    </footer>
  </div>
</template>

<script lang="ts">
import { defineComponent, reactive, ref, computed } from "vue";
import { useStore } from "vuex";
import GlobalHeader, { UserProps } from "./components/GlobalHeader .vue";
import Login from "./views/Login.vue";
import Home from "./views/Home.vue";

// 如果未登录显示登陆注册两个按钮 登陆了显示具体个人信息
// const currentUser: UserProps = {
//   isLogin: false,
//   name: "黄嘉涵",
// };

export default defineComponent({
  name: "App",

  components: {
    GlobalHeader,
    Login,
    Home,
  },
  setup() {
    const store = useStore();
    const currentUser = computed(() => store.state.user);
    return {
      currentUser,
    };
  },
});
</script>

<style></style>
